Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@babel/plugin-transform-member-expression-literals
Advanced tools
Ensure that reserved words are quoted in property accesses
The @babel/plugin-transform-member-expression-literals package is a Babel plugin that transforms member expressions with literal properties into a form that can be more efficiently minimized. This means that it will convert object properties accessed with a literal (e.g., obj['property']) into dot notation (e.g., obj.property), which can be shorter and more optimized in the context of JavaScript code minification.
Transform member expressions with literal properties to dot notation
This feature automatically converts member expressions that use literal strings for accessing properties into dot notation. This is particularly useful for code minification and optimization.
obj['property'] // Before transformation
obj.property // After transformation
Similar to @babel/plugin-transform-member-expression-literals, this plugin focuses on transforming object properties that are literals into a more minifiable form. However, it specifically targets properties in object definitions rather than member expressions. It's another tool in the Babel ecosystem for optimizing JavaScript code.
While not a Babel plugin, uglify-js is a widely used JavaScript minifier that includes transformations similar to what @babel/plugin-transform-member-expression-literals offers. It can convert member expressions with literal properties into dot notation as part of its minification process, among many other optimizations.
Ensure that reserved words are quoted in property accesses
See our website @babel/plugin-transform-member-expression-literals for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-member-expression-literals
or using yarn:
yarn add @babel/plugin-transform-member-expression-literals --dev
v7.25.7 (2024-10-02)
babel-helper-validator-identifier
babel-traverse
babel-plugin-transform-classes
super()
check (@nicolo-ribaudo)babel-generator
infer
in compact mode (@nicolo-ribaudo)[no LineTerminator here]
after nodes (@nicolo-ribaudo)babel-types
babel-core
--experimental-require-module
(@nicolo-ribaudo)babel-helper-compilation-targets
, babel-helper-plugin-utils
, babel-preset-env
babel-plugin-proposal-destructuring-private
, babel-plugin-syntax-decimal
, babel-plugin-syntax-import-reflection
, babel-standalone
babel-generator
[no LineTerminator here]
before nodes (@nicolo-ribaudo)babel-plugin-transform-typescript
babel-types
BABEL_TYPES_8_BREAKING
at startup (@nicolo-ribaudo)FAQs
Ensure that reserved words are quoted in property accesses
The npm package @babel/plugin-transform-member-expression-literals receives a total of 22,702,074 weekly downloads. As such, @babel/plugin-transform-member-expression-literals popularity was classified as popular.
We found that @babel/plugin-transform-member-expression-literals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.